Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Robustify spawner (backport #1501) #1686

Merged
merged 3 commits into from
Aug 16, 2024
Merged

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Aug 16, 2024

With the current implementation it can happen that when using multiple controller spawners some of them fail or get stuck, see #1182. This fixes #1182 and #1483.

While writing this, I realize this has great overlap with #1483, but I see no problem combining those two.

As briefly mentioned above, this change addresses two things:

  • The node discovery mechanism for the controller manager seems to be error-prone and not strictly needed.
  • It can happen that we don't get a response from the service server and hang in a deadlock.

Note: The test I implemented is a bit hacky, so we might also want to remove it again? Otherwise I think we would have to change the following things:

  • I installed the test folder in order to access the controller configuration file living in there. We should either install that file by hand rather than the complete test folder or move it somewhere else.
  • I've added a urdf file in ros_control_test_assets as I thought that might be the most useful place. I might be wrong.
  • I've added a sleep to my test before checking whether the controller_manager shows up all the expected controllers. That worked for me for an implementation, but since a timeout is very error-prone it would be better to have a proper waiting mechanism. With the changes I made the spawners should die eventually and not hang in a deadlock, so we could add event handlers to the launch description, but I'm not sure how to combine the exit events from all the spawners into one trigger.

I implemented and tested things on the rolling on jammy installation I currently have, but I know the problem definitively also arises for humble users.


This is an automatic backport of pull request #1501 done by Mergify.

…ollers (#1501)

---------

Co-authored-by: Dr. Denis <denis@stoglrobotics.de>
(cherry picked from commit 80c264f)

# Conflicts:
#	controller_manager/test/test_spawner_unspawner.cpp
Copy link
Contributor Author

mergify bot commented Aug 16, 2024

Cherry-pick of 80c264f has failed:

On branch mergify/bp/humble/pr-1501
Your branch is up to date with 'origin/humble'.

You are currently cherry-picking commit 80c264f.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   controller_manager/controller_manager/controller_manager_services.py

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   controller_manager/test/test_spawner_unspawner.cpp

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@mergify mergify bot added the conflicts label Aug 16, 2024
destogl
destogl previously approved these changes Aug 16, 2024
controller_manager/test/test_spawner_unspawner.cpp Outdated Show resolved Hide resolved
controller_manager/test/test_spawner_unspawner.cpp Outdated Show resolved Hide resolved
Copy link

codecov bot commented Aug 16, 2024

Codecov Report

Attention: Patch coverage is 68.00000% with 8 lines in your changes missing coverage. Please review.

Project coverage is 62.28%. Comparing base (8b32c33) to head (42b4c12).
Report is 1 commits behind head on humble.

Files Patch % Lines
.../controller_manager/controller_manager_services.py 55.55% 2 Missing and 2 partials ⚠️
controller_manager/test/test_spawner_unspawner.cpp 75.00% 0 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           humble    #1686      +/-   ##
==========================================
+ Coverage   62.27%   62.28%   +0.01%     
==========================================
  Files         105      105              
  Lines       11295    11314      +19     
  Branches     7910     7928      +18     
==========================================
+ Hits         7034     7047      +13     
- Misses        807      808       +1     
- Partials     3454     3459       +5     
Flag Coverage Δ
unittests 62.28% <68.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
.../controller_manager/controller_manager_services.py 66.15% <55.55%> (-1.59%) ⬇️
controller_manager/test/test_spawner_unspawner.cpp 58.47% <75.00%> (+0.92%) ⬆️

@destogl destogl merged commit b6bdce9 into humble Aug 16, 2024
10 of 11 checks passed
@destogl destogl deleted the mergify/bp/humble/pr-1501 branch August 16, 2024 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants